﻿using System.Collections.Generic;
using System.Linq;

using Xyz.Web.Reservation.BookingService;

namespace Xyz.Web.Reservation.Repositories
{
    public class BookingRepository : BaseRepository
    {
        public static List<BookingDTO> GetCustomerBookings(int customerId)
        {
            return BookingServiceClient.GetBookingsByCustomer(customerId).ToList();
        }

        public static BookingDTO GetBooking(string bookingCode)
        {
            return BookingServiceClient.GetBooking(bookingCode);
        }

        public string CreateBooking(BookingDTO bookingDto)
        {
            return BookingServiceClient.CreateBooking(bookingDto);
        }

        public static void CancelBooking(int bookingId)
        {
            BookingServiceClient.CancelBooking(bookingId);
        }
    }
}